/**
 * author:Administrator
 * date:2016/2/24
 * desc:TODO
 */

'use strict';

var RepoImpl = require('../../../infrastructure/persist').CustomerRepoImpl;

class CustomerRepo {

  /**
   * return pojo
   * @param id
   * @returns {*}
   */
  static * find(id) {
    return yield RepoImpl.find(id);
  }

  /**
   * return pojo list
   * @param uId
   * @returns {*}
   */
  static * findByUid(uId) {
    return yield RepoImpl.findByUid(uId);
  }

  /**
   * @param customer
   * @param t transaction
   * @returns void
   */
  static * store(customer, t) {
    yield RepoImpl.store(customer, t);
  }
}

module.exports = CustomerRepo;
